package com.moss.cloud.common.core.model.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer;
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;
/**
 * BaseVo公共返回参数
 *
 * @author 瑾年
 * @date 2023年4月9日
 */
@Data
public class BaseVo implements Serializable {
    public static final String DATE_FORMAT = "yyyy-MM-dd HH:mm:ss";
    private Long id = 0L;
    private String createdBy;
    private String updatedBy;
    @JsonDeserialize(using = LocalDateTimeDeserializer.class)
    @JsonSerialize(using = LocalDateTimeSerializer.class)
    @JsonFormat(pattern = DATE_FORMAT)
    private LocalDateTime createdTime;
    @JsonDeserialize(using = LocalDateTimeDeserializer.class)
    @JsonSerialize(using = LocalDateTimeSerializer.class)
    @JsonFormat(pattern = DATE_FORMAT)
    private LocalDateTime updatedTime;
    /**
     * 是否禁用（0启用；1禁用；2删除）
     */
    private Integer deleted;
}
